﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyFloridaHouse.LibDTO;
using System.Data;

namespace MyFloridaHouse.DataAccess.Extensions
{
    public class ShapeDTODataContract
    {
        public static ShapeDTO DataContract(IDataReader rdr)
        {
            var newItem = new ShapeDTO
            {
                name = rdr["name"].ToString(),
                wkt = rdr["wkt"].ToString(),
                centerLngX = Convert.ToDouble(rdr["centerLngX"]),
                centerLatY = Convert.ToDouble(rdr["centerLatY"])
            };
            return newItem;
        }
    }
}